/*
 * Copyright (c) 2025 EasyAdmin
 * All rights reserved.
 *
 * This file is part of the [EasAdmin] project.
 * Unauthorized copying of this file, via any medium, is strictly prohibited.
 * Proprietary and confidential.
 *
 * Author: EasyAdmin ( 1073602@qq.com )
 * Website: https://www.xhxiao.com
 */
package com.easy.module.system.service;

import com.easy.framework.database.service.IService;
import com.easy.framework.security.model.Dept;
import com.easy.module.system.entity.SysUserDept;
import com.easy.module.system.query.SysUserDeptQuery;

import java.util.List;

/**
 * 用户部门 Service接口
 *
 * @author EasyAdmin ( 1073602@qq.com )
 * @date 2025-08-19
 */
public interface ISysUserDeptService extends IService<SysUserDept, SysUserDeptQuery> {
    boolean addUserDept(SysUserDept sysUserDept);

    boolean updateUserDept(SysUserDept sysUserDept);

    List<SysUserDept> queryList(SysUserDeptQuery query);

    List<SysUserDept> listByUserId(Long userId);

    /**
     * 获取指定用户ID的岗位ID列表
     * @param userId
     * @return
     */
    List<Long> getPostIdListByUserId(Long userId);

    /**
     * 部门是否有用户
     * @param deptId
     * @return
     */
    boolean hasUserByDeptId(Long deptId);

    List<Dept> getDeptByUserId(Long userId);
}
